const BaseController = require('../BaseController');

/**
 * 
 */
class ApiDataController extends BaseController {
	// 接口分类查询
	async queryApi() {
        const { ctx, app, service } = this;
        // const id = ctx.params.id;
		// 解析参数主要是查询参数
		const res = await service.admin.apiDataService.queryApi();
		return this.ok(res);
    }
    async queryApiById() {
        const { ctx, app, service } = this;
        const id = ctx.params.id;
		// 解析参数主要是查询参数
		const res = await service.admin.apiDataService.queryApi(id);
		return this.ok(res);
    }
}

module.exports = ApiDataController;
